<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>钻石</title>
</head>

<body>
    <!--
        作者：放弃懒惰
        链接：https://www.zhihu.com/question/40149352/answer/3123033666
        来源：知乎
        著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。
    -->
    <div class="diamond"></div>
    <style>
        .diamond {
            position: relative;
            display: block;
            width: 50px;
            height: 0;
            border-width: 0 25px 25px 25px;
            border-style: solid;
            border-color: transparent transparent rgb(218, 104, 199) transparent;
            box-sizing: content-box;
        }

        .diamond:after {
            position: absolute;
            top: 25px;
            left: -25px;
            width: 0;
            height: 0;
            content: "";
            border-width: 70px 50px 0 50px;
            border-style: solid;
            border-color: rgb(218, 104, 199) transparent transparent transparent;
        }
    </style>
</body>

</html>